import Vue from 'vue'
import Vuex from 'vuex'
import filters from './filters'
import {http, componentHttp, loghttp, ajaxInvokeFileHttp, setToken, setComponentToken, setAjaxInvokeFileToken} from './apiInstances'
import {getQueryString} from './utils'

require('./extend')
const init = () => {
  window.yxt = window.yxt || {}
  if (process.env.NODE_ENV === 'production') {
    console.log('加载产线外部依赖')
  } else {
    console.log('加载测试外部依赖')
  }
  Vue.use(Vuex)
  Vue.use(filters)
  Vue.prototype.getQueryString = getQueryString
  window.setLocalStorage('code', 'wangyx')
  window.setLocalStorage('userId', '7d624ec8-0d24-4dba-9cb7-b4a52f308e9c')
}
export {
  http, componentHttp, loghttp, ajaxInvokeFileHttp, setToken, setComponentToken, setAjaxInvokeFileToken,
  init
}
